import request from '@/utils/request'

// 查询兼职岗位列表
export function listParttimePosition(query) {
  return request({
    url: '/enterprise/parttimePosition/list',
    method: 'get',
    params: query
  })
}

// 查询我发布的兼职岗位列表
export function myListParttimePosition(query) {
  return request({
    url: '/enterprise/parttimePosition/myList',
    method: 'get',
    params: query
  })
}

// 查询兼职岗位详细
export function getParttimePosition(id) {
  return request({
    url: '/enterprise/parttimePosition/' + id,
    method: 'get'
  })
}

// 新增兼职岗位
export function addParttimePosition(data) {
  return request({
    url: '/enterprise/parttimePosition',
    method: 'post',
    data: data
  })
}
// 新增我公司的兼职岗位
export function addMyParttimePosition(data) {
  return request({
    url: '/enterprise/parttimePosition/myAdd',
    method: 'post',
    data: data
  })
}


// 修改兼职岗位
export function updateParttimePosition(data) {
  return request({
    url: '/enterprise/parttimePosition',
    method: 'put',
    data: data
  })
}

// 删除兼职岗位
export function delParttimePosition(id) {
  return request({
    url: '/enterprise/parttimePosition/' + id,
    method: 'delete'
  })
}
